<template>
  <div class="pagination flex">
    <div>
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage"
        :page-size="pageSize"
        background
        :page-sizes="[10, 15, 20, 30]"
        layout="prev, pager, next"
        :total="total"
      >
      </el-pagination>
    </div>
  </div>
</template>
<script>
export default {
  name: 'pagination',
  props: {
    pageSize: {
      type: Number,
      default: 20
    },
    total: {
      type: Number,
      default: 500
    },
    currentPage: {
      type: Number,
      default: 1
    }
  },
  methods: {
    handleSizeChange (val) {
    },
    handleCurrentChange (val) {
      this.$emit('paginationCallBack', val)
    }
  },
}
</script>
<style>
.flex {
  justify-content: flex-end;
  margin:20px 0 0;
}
.pagination_text {
  font-size: 14px;
  color: #747272;
}
.pagination{
  display: flex;
  align-items: center;
  font-size: 12px;
}
</style>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              